/*
泛型的界限
有上界就有下界
 */
package com.Generics4;

public class Score2<S> {  //使用extend继承Number类型，设定泛型上界，表示必须是Number类型或Number的子类
    //Number的子类包括Integer，Double，Float
    private String name;
    private int id;
    private S score;

    public Score2(String name, int id, S score){
        this.name = name;
        this.id = id;
        this.score = score;
    }

    public S getScore() {
        return score;
    }
}
